<!DOCTYPE html>
<!--[if IE 8 ]>
<html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"><!--<![endif]-->
<head>

    <!-- Basic Page Needs
    ================================================== -->
    <meta charset="utf-8"/>
    <title>评价</title>

    <!-- Mobile Specific Metas
    ================================================== -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

    <!-- CSS
    ================================================== -->
    <link rel="stylesheet" href="css/style.css" th:href="@{/css/style.css}"/>
    <link rel="stylesheet" href="css/colors/green.css" th:href="@{/css/colors/green.css}" id="colors"/>

    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>

<body class="boxed">
<div id="wrapper">


    <!-- Header
        ================================================== -->
    <div th:replace="fragments/header :: header"></div>


    <!-- Titlebar
================================================== -->
    <section class="titlebar">
        <div class="container">
            <div class="sixteen columns">
                <h2></h2>

                <nav id="breadcrumbs">
                    <ul>
                        <li><a th:href="@{myUnreviewedOrder}">待评价</a></li>
                        <li>评价</li>
                    </ul>
                </nav>
            </div>
        </div>
    </section>


    <!-- Content
    ================================================== -->

    <!-- Container -->
    <div class="container">

        <div class="sixteen columns">
            <h4 class="headline" th:text="'订单：' + ${order_id}"></h4><span class="line margin-bottom-35"></span>
            <div class="clearfix"></div>

            <!-- Cart -->
            <table class="cart-table responsive-table">

                <tr>
                    <th></th>
                    <th>商品</th>
                    <th>满意度</th>
                    <th>文字评价</th>
                    <th></th>
                </tr>

                <div th:each="item,itemStat : ${items}">

                    <!-- Item #1 -->
                    <tr th:if="${item.review eq null}">
                        <form th:action="@{/reviewOrderItem}">
                            <td>
                                <div class="happy-clients-photo"><img th:src="@{'/images/' + ${item.item.order_item_image} }" alt=""/></div>
                            </td>
                            <td class="cart-title"><a href="#" th:text="${item.item.order_item_name} + ' X' + ${item.item.order_item_num}"></a></td>
                            <td><select id="score" name="score">
                                <option value="100">100%</option>
                                <option value="80">80%</option>
                                <option value="60">60%</option>
                                <option value="40">40%</option>
                                <option value="20">20%</option>
                            </select></td>
                            <td><input type="text" id="detail" name="detail"/>
                                <input type="hidden" id="o_i_id" name="o_i_id" th:value="${item.item.id}"/>
                                <input type="hidden" id="i_id" name="i_id" th:value="${item.item.order_item_id}"/></td>
                            <td class="cart-total"><input type="submit" class="button" value="评价"/></td>
                        </form>
                    </tr>

                    <!-- Item #2 -->
                    <tr th:if="${item.review ne null}">
                        <td>
                            <div class="happy-clients-photo"><img th:src="@{'/images/' + ${item.item.order_item_image} }" alt=""/></div>
                        </td>
                        <td class="cart-title"><a href="#" th:text="${item.item.order_item_name} + ' X' + ${item.item.order_item_num}"></a></td>
                        <td th:text="${item.review.score} + '%'"></td>
                        <td th:text="${item.review.detail}"></td>
                        <td class="cart-total">已评价</td>
                    </tr>

                </div>

            </table>

        </div>

    </div>

    <div class="margin-top-50"></div>


    <!-- Footer
    ================================================== -->
    <div th:replace="fragments/footer :: footer"></div>

</div>


<!-- Java Script
================================================== -->
<div th:replace="fragments/scripts :: scripts"></div>


<!-- Style Switcher
================================================== -->
<div th:replace="fragments/styleswitcher :: styleswitcher"></div>


</body>
</html>